﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TreeViewPicker
{
   
    public class TreeNode
    {
   
        public string data { get; set; }
      
        public TreeNodeAttributes attr { get; set; }
      
        public string state { get; set; }

        public static TreeNode CreateFrom(OrganisationalUnit item)
        {
            var node = new TreeNode();
            node.data = item.Name;
            node.attr = new TreeNodeAttributes() { id = item.CName, name = item.Name };
            node.state = "closed";
            return node;
        }



    }
}